package school.valon.persistence.pojo;

import java.io.Serializable;

import javax.persistence.*;

import java.util.List;


/**
 * The persistent class for the user_status database table.
 * 
 */
@Entity
@Table(name="user_status")
@NamedQueries({
@NamedQuery(name="UserStatus.findAll", query="SELECT u FROM UserStatus u"),
@NamedQuery(name="UserStatus.deleteById", query="DELETE FROM UserStatus WHERE statusId = :P1")
})
public class UserStatus implements Serializable {

	private static final long serialVersionUID = -1923361146847334627L;

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="status_id")
	private Integer statusId;

	@Column(name="status_name")
	private String statusName;

	//bi-directional many-to-one association to User
	@OneToMany(mappedBy="userStatus", fetch=FetchType.LAZY)
	private List<User> users;

	public Integer getStatusId() {
		return this.statusId;
	}

	public void setStatusId(Integer statusId) {
		this.statusId = statusId;
	}

	public String getStatusName() {
		return this.statusName;
	}

	public void setStatusName(String statusName) {
		this.statusName = statusName;
	}

	public List<User> getUsers() {
		return this.users;
	}

	public void setUsers(List<User> users) {
		this.users = users;
	}
}